﻿<!--
//*********************************************************
//
// Copyright (c) Microsoft. All rights reserved.
// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************
-->
<common:SharePage
    x:Class="ShareSource.SetErrorMessage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:ShareSource"
    xmlns:common="using:SDKTemplate.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid x:Name="LayoutRoot" Background="White" HorizontalAlignment="Left" VerticalAlignment="Top">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>
        <Grid x:Name="Input" Grid.Row="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <StackPanel HorizontalAlignment="Left">
                <TextBlock TextWrapping="Wrap" MaxWidth="500" Style="{StaticResource BasicTextStyle}">
                    If the user tries to share when your app is not able to support share, you can provide a failure message that will be displayed in the share pane. This message should help the user understand why they cannot share and what they need to do to complete their task. You do not need to use this message if your app never supports share. Windows provides a default message for that case.
                </TextBlock>
                <TextBlock TextWrapping="Wrap" Width="500" Style="{StaticResource BasicTextStyle}">
                    <LineBreak/>Choose the failure display text
                </TextBlock>
                <TextBox x:Name="CustomErrorText" HorizontalAlignment="Stretch" MaxWidth="500" Height="100" TextWrapping="Wrap" AcceptsReturn="True"
                    Background="LightGray" Text="You have selected too many images. Select fewer than 50 images and then try again." />
                <TextBlock TextWrapping="Wrap" HorizontalAlignment="Stretch" MaxWidth="500" Style="{StaticResource BasicTextStyle}">
                    <LineBreak/>When share is invoked, the above display text will be shown. To invoke share, bring up the charms bar and select Share (or press Win+H).
                </TextBlock>
            </StackPanel>
        </Grid>

        <Grid x:Name="Output" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1">
        </Grid>
        
        <!-- Add Storyboards to the visual states below as necessary for supporting the various layouts -->
        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup>
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>
                <VisualState x:Name="FullScreenPortrait"/>
                <VisualState x:Name="Snapped"/>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</common:SharePage>
